package it.canraid.control;

public enum Level {
    FATAL(0), ERROR(1), WARNING(2), INFO(3), ASSERT(4);

    private final int value;

    Level(int value) {
	this.value = value;
    }

    public static int whoIsMax(Level levelSx, Level levelDx) {
	if (levelSx.value < levelDx.value)
	    return 1;

	if (levelSx.value > levelDx.value)
	    return -1;

	return 0;
    }
}
